<?php
include 'classes/xmlReader.php';

$xmlurl = "playlist.xml";
$xmlreader = new xmlreader ($xmlurl);
$xml = $xmlreader->parse();
$songs = $xml;
//print_r($songs);
//print "<pre>";
//print "<b>track</b>\n";

for ($i=0; $i<sizeof ($songs); $i++)
{
$song = $songs[$i];
//print_r($song);
$track = $songs["playlist"];
//print_r ($songs["playlist"]["#"]["trackList"]["#"]["location"]);
$tests = $songs["@"]["track"];

$location = $songs["#"]["BUY"][0]["#"];
//$sale = $songs["#"]["SALE"][0]["#"];
//print "$song \t$track \t$location\n";
}

?>

<html>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<link rel="stylesheet" href="karaoke.css"/>
<script src="karaoke.js" language="JavaScript" type="text/javascript"></script>
</head>


<body onLoad="playOption"  onLoad="qtStatus()">


<div id = "main">

	<img src = "http://itp.nyu.edu/~aam423/designWorkshop/final/img/tv3.png"/>

		<div id="tv">

			<script language="JavaScript" type="text/javascript">
			InsertMovie();
			
			setInterval("qtStatus();", 1000);

			
		/*	resizing attempts.
	
			//checking status.. and geting movie size when applet loaded.
	
			var badStat = "Complete"; 

			console.log(document.ktest.GetPluginStatus());
			var stat = document.ktest.GetPluginStatus();
		

			// poor solution...will refine with onload function.
			
			setTimeout("movieSize();",100);	

			/*
 
			if (stat == badStat)
			{
				var movieHeight = document.ktest.GetRectangle().substring(9,12);
				console.log(movieHeight);	
			}

			

			*/
			
		

			</script>
			

		</div>

		<div id="onOff" onclick = "javascript:onOff(document.ktest)"></div> 

 
	

</div>



<br/>
<br/>

</body>


<!--
<OBJECT classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
        codebase="http://www.apple.com/qtactivex/qtplugin.cab"
        width="320" height="240"
        id="bruce" >

        <PARAM name="src" value="/home/ss4259/public_html/karaoke/assets/dacningi.kar">

 <EMBED width="320" height="240"
        src="/home/ss4259/public_html/karaoke/assets/dacningi.kar"
        name="bruce"
        enablejavascript="true">
 </EMBED>
</OBJECT>

<a href="javascript:document.bruce.Play();">Play()</a>
<a href="javascript:document.bruce.Stop();">javascript:document.bruce.Stop()</a><br>
<a href="javascript:document.GetPluginVersion();">blah </a>
-->


</html>
